﻿using System.Collections.Generic;
using com.guojin.core.io;
using com.guojin.core.io.message;


namespace com.guojin.mj.net.message.game
{
    public class DissolveRoomPlayerInfo: Message
    {
        public static int TYPE = 12 ;
        public static int ID =  30 ;

        public int userId { get; set; }
        public int LocationIndex { get; set; }     //玩家编号
        public int Rank { get; set; }                   //0 没有称号 1MVP 2土豪 3 大鱼
        public string name { get; set; }             //玩家姓名
        public int takeInScore { get; set; }         //带入积分
        public int settleScore { get; set; }          //结算积分

        public void decode(Input _in)
        {
            userId = _in.readInt();
            LocationIndex = _in.readInt();
            Rank = _in.readInt();
            name = _in.readString();
            takeInScore = _in.readInt();
            settleScore = _in.readInt();
        }

        public void encode(Output _out)
        {          
        }

        public int getMessageId()
        {
            return ID;
        }

        public int getMessageType()
        {
            return TYPE;
        }

        public string toString()
        {
            return string.Format("userId = {5} LocationIndex= {0}, Rank={1}, name={2}, takeInScore={3}, " +
                                 "settleScore={4}", LocationIndex, Rank, name, takeInScore, settleScore, userId);
        }
    }
}